package com.warehouse.mapper;

import com.warehouse.entity.StockIn;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface StockInMapper {
    
    List<StockIn> selectAll();
    
    StockIn selectById(@Param("id") Long id);
    
    List<StockIn> selectByProductId(@Param("productId") Long productId);
    
    List<StockIn> selectByDateRange(@Param("startTime") LocalDateTime startTime, 
                                   @Param("endTime") LocalDateTime endTime);
    
    List<StockIn> selectBySupplier(@Param("supplier") String supplier);
    
    int insert(StockIn stockIn);
    
    int insertBatch(@Param("stockIns") List<StockIn> stockIns);
    
    int update(StockIn stockIn);
    
    int deleteById(@Param("id") Long id);
    
    long countToday();
} 